<template>
	<view class="summary">
		{{ getText() }}
	</view>
</template>

<script>
export default {
	props: ['summaryData', 'labelList'],
	data() {
		return {};
	},
	methods: {
		getText() {
			const arr = []
			this.labelList.forEach(item => {
				arr.push(`${item.label}：${this.summaryData[item.key] || '-'}`)
			})
			return arr.join('，')
		}
	},
};
</script>

<style scoped lang="scss">
.summary {
	display: flex;
	align-items: center;
	font-weight: bold;
	height: 35px;
	padding-left: 10px;
	background: rgb(177, 235, 245);
}
</style>
